package webEquipeRechercheGwt.client.entityMirror;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;

@SuppressWarnings("serial")
public class PaperMirror implements Serializable {

	private int id;
	private String title;
	private String state;
	private String url4pdf;
	private Collection<PersonMirror> authors;
	
	public PaperMirror() {
		super();
		authors = new ArrayList<PersonMirror>();
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getUrl4pdf() {
		return url4pdf;
	}
	public void setUrl4pdf(String url4pdf) {
		this.url4pdf = url4pdf;
	}
	public Collection<PersonMirror> getAuthors() {
		return authors;
	}
	public void setAuthors(Collection<PersonMirror> authors) {
		this.authors = authors;
	}
	public boolean equals(PaperMirror p){
		return p.getId()==getId();
	}
	
	@Override
	public boolean equals(Object p){
		try{
			PaperMirror param = (PaperMirror) p;
			return param.getId()==getId();
		}
		catch(ClassCastException e){
			return false;
		}
	}
}
